/**
* 通用css样式布局处理
* Copyright (c) 2019 ruoyi
*/

/** 基础通用 **/
.pt5 {
  padding-top: 5px;
}

.pr5 {
  padding-right: 5px;
}

.pb5 {
  padding-bottom: 5px;
}

.mt5 {
  margin-top: 5px;
}

.mr5 {
  margin-right: 5px;
}

.mb5 {
  margin-bottom: 5px;
}

.mb8 {
  margin-bottom: 8px;
}

.ml5 {
  margin-left: 5px;
}

.mt10 {
  margin-top: 10px;
}

.mr10 {
  margin-right: 10px;
}

.mb10 {
  margin-bottom: 10px;
}

.ml10 {
  margin-left: 10px;
}

.mt20 {
  margin-top: 20px;
}

.mr20 {
  margin-right: 20px;
}

.mb20 {
  margin-bottom: 20px;
}

.ml20 {
  margin-left: 20px;
}

.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: inherit;
  font-weight: 500;
  line-height: 1.1;
  color: inherit;
}

.el-message-box__status+.el-message-box__message {
  word-break: break-word;
}

.el-dialog:not(.is-fullscreen) {
  margin-top: 6vh !important;
}

.el-dialog__wrapper.scrollbar .el-dialog .el-dialog__body {
  overflow: auto;
  overflow-x: hidden;
  max-height: 70vh;
  padding: 10px 20px 0;
}

.el-table {

  .el-table__header-wrapper,
  .el-table__fixed-header-wrapper {
    th {
      word-break: break-word;
      background-color: #f8f8f9;
      color: #515a6e;
      height: 40px;
      font-size: 13px;
    }
  }

  .el-table__body-wrapper {
    .el-button [class*="el-icon-"]+span {
      margin-left: 1px;
    }
  }
}

/** 表单布局 **/
.form-header {
  font-size: 15px;
  color: #6379bb;
  border-bottom: 1px solid #ddd;
  margin: 8px 10px 25px 10px;
  padding-bottom: 5px;
}

/** 表格布局 **/
.pagination-container {
  position: relative;
  height: 25px;
  margin-bottom: 10px;
  margin-top: 15px;
  padding: 10px 20px !important;
}

/* tree border */
.tree-border {
  margin-top: 5px;
  border: 1px solid #e5e6e7;
  background: #ffffff none;
  border-radius: 4px;
}

.pagination-container .el-pagination {
  right: 0;
  position: absolute;
}

@media (max-width: 768px) {
  .pagination-container .el-pagination>.el-pagination__jump {
    display: none !important;
  }

  .pagination-container .el-pagination>.el-pagination__sizes {
    display: none !important;
  }
}

.el-table .fixed-width .el-button--mini {
  padding-left: 0;
  padding-right: 0;
  width: inherit;
}

/** 表格更多操作下拉样式 */
.el-table .el-dropdown-link,
.el-table .el-dropdown-selfdefine {
  cursor: pointer;
  margin-left: 5px;
}

.el-table .el-dropdown,
.el-icon-arrow-down {
  font-size: 12px;
}

.el-tree-node__content>.el-checkbox {
  margin-right: 8px;
}

.list-group-striped>.list-group-item {
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  padding-left: 0;
  padding-right: 0;
}

.list-group {
  padding-left: 0px;
  list-style: none;
}

.list-group-item {
  border-bottom: 1px solid #e7eaec;
  border-top: 1px solid #e7eaec;
  margin-bottom: -1px;
  padding: 11px 0px;
  font-size: 13px;
}

.pull-right {
  float: right !important;
}

.el-card__header {
  padding: 14px 15px 7px;
  min-height: 40px;
}

.el-card__body {
  padding: 15px 20px 20px 20px;
}

.card-box {
  padding-right: 15px;
  padding-left: 15px;
  margin-bottom: 10px;
}

/* button color */
.el-button--cyan.is-active,
.el-button--cyan:active {
  background: #20b2aa;
  border-color: #20b2aa;
  color: #ffffff;
}

.el-button--cyan:focus,
.el-button--cyan:hover {
  background: #48d1cc;
  border-color: #48d1cc;
  color: #ffffff;
}

.el-button--cyan {
  background-color: #20b2aa;
  border-color: #20b2aa;
  color: #ffffff;
}

/* text color */
.text-navy {
  color: #1ab394;
}

.text-primary {
  color: inherit;
}

.text-success {
  color: #1c84c6;
}

.text-info {
  color: #23c6c8;
}

.text-warning {
  color: #f8ac59;
}

.text-danger {
  color: #ed5565;
}

.text-muted {
  color: #888888;
}

/* image */
.img-circle {
  border-radius: 50%;
}

.img-lg {
  width: 120px;
  height: 120px;
}

.avatar-upload-preview {
  position: relative;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  border-radius: 50%;
  box-shadow: 0 0 4px #ccc;
  overflow: hidden;
}

/* 拖拽列样式 */
.sortable-ghost {
  opacity: 0.8;
  color: #fff !important;
  background: #42b983 !important;
}

.top-right-btn {
  position: relative;
  float: right;
}

// 多行文本超出隐藏
@for $i from 1 through 10 {
  .line-#{$i} {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: $i;
  }
}

// $spacing-types: (
//   //类型
//   m: margin,
//   p: padding
// );
// $spacing-directions: (
//   //位置
//   t: top,
//   b: bottom,
//   l: left,
//   r: right
// );

// $spacing-base-size: 10px; //基数
// $spacing-sizes: (
//   //需要的边距可以添加
//   0: 0,
//   1: 1,
//   2: 2,
//   3: 3,
//   4: 4,
//   5: 5
// );

// //   循环出 margin 与 padding 的各类值

// @each $typeKey, $type in $spacing-types {
//   // m-1{margin:10px} || p-5{padding:50px}
//   @each $sizeKey, $size in $spacing-sizes {
//     .#{$typeKey}-#{$sizeKey} {
//       #{$type}: $size * $spacing-base-size;
//     }
//   }
//   // mx-1{marfin-left:10px;marfin-right:10px} || px-5{padding-left:50px;padding-right:50px;}
//   @each $sizeKey, $size in $spacing-sizes {
//     .#{$typeKey}x-#{$sizeKey} {
//       #{$type}-left: $size * $spacing-base-size;
//       #{$type}-right: $size * $spacing-base-size;
//     }
//   }

//   // my-1{marfin-top:10px;marfin-bottom:10px} || py-5{padding-top:50px;padding-bottom:50px;}
//   @each $sizeKey, $size in $spacing-sizes {
//     .#{$typeKey}y-#{$sizeKey} {
//       #{$type}-top: $size * $spacing-base-size;
//       #{$type}-bottom: $size * $spacing-base-size;
//     }
//   }
//   // mt-1 { margin-top: 10px } || pb-5{paddding-bottom:50px;}||ml-2{margin-left:20px}||pr-4{padding-right:40px}
//   @each $directionsKey, $directions in $spacing-directions {
//     @each $sizeKey, $size in $spacing-sizes {
//       .#{$typeKey}#{$directionsKey}-#{$sizeKey} {
//         #{$type}-#{$directions}: $size * $spacing-base-size;
//       }
//     }
//   }
// }

html {
  height: 100%;
  box-sizing: border-box;
}

body {
  height: 100%;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

::-webkit-scrollbar-track-piece {
  //滚动条凹槽的颜色，还可以设置边框属性
  background-color: #f8f8f8;
}

::-webkit-scrollbar {
  //滚动条的宽度
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  //滚动条的设置
  background-color: #dddddd;
  background-clip: padding-box;
  min-height: 28px;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #bbb;
}

label {
  // font-weight: bold;
  color: #333;
}

a:focus,
a:active {
  outline: none;
}

a,
a:focus,
a:hover {
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

aside {
  background: #eef1f6;
  padding: 8px 24px;
  margin-bottom: 20px;
  border-radius: 2px;
  display: block;
  line-height: 32px;
  font-size: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  color: #2c3e50;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  a {
    color: #337ab7;
    cursor: pointer;

    &:hover {
      color: rgb(32, 160, 255);
    }
  }
}

//main-container全局样式
.app-container {
  // padding: 30px;
  min-height: 100%;
  min-height: 842px;
  overflow-y: auto;
  overflow-x: hidden;

  .borderR {
    background: #fff;
    padding: 10px;
    padding-top: 15px;
    border-radius: 10px 0 10px 0;
  }

  .search-box {
    .el-input__inner {
      background: #d9e2f68a;
      // border: 1px solid $input-base;
      color: #15161e;
    }

    .el-range-input {
      background: #11133600;
      color: #15161e;
    }

    .el-range-separator {
      color: #f7f7f7d6;
    }
  }
}

// 列表带fixed分页的表格
.table-container {
  padding-bottom: 78px;
}

// 表单提交页面底部fixed的按钮容器
.confirm-btn-container {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  z-index: 2000;
  box-shadow: 0px -3px 3px #eeeeee;
  background: #fff;
  padding: 12px 32px;
  text-align: center;
}

// 常用卡片的容器
.card-container {
  border: 1px solid #dfe6ec;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 0 6px 0 rgba(0, 0, 0, 0.04);
}

// 标题盒子
.title-box {
  background: #eef1f6;
  height: 48px;
  line-height: 48px;
  padding: 0 16px;
  font-weight: bold;
  font-size: 14px;
  color: #333333;
}

.title-box:before {
  display: inline-block;
  border: 2px solid #1890ff;
  content: "";
  height: 12px;
  margin-right: 6px;
}

.article-title-box {
  padding: 0 0;
  border-bottom: 1px solid #ddd;

  .article-title {
    display: inline-block;
    padding: 5px 12px;
    position: relative;
  }

  .article-title:before {
    display: inline-block;
    border: 2px solid #1890ff;
    content: "";
    height: 12px;
    position: absolute;
    top: 7px;
    left: 0;
  }
}

.link-type,
.link-type:focus {
  color: #337ab7;
  cursor: pointer;

  &:hover {
    color: rgb(32, 160, 255);
  }
}

// 搜索条件盒子
.search-box {

  // padding-bottom: 10px;
  .filter-item {
    display: inline-block;
    vertical-align: middle;
    margin-bottom: 28px;
  }
}

// 浮动
.fr {
  float: right;
}

.fl {
  float: left;
}

.clearfix {
  zoom: 1;

  &:after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: " ";
    clear: both;
    height: 0;
  }
}

// 盒子
$sp-size: 0;

@while $sp-size <=100 {
  .m#{$sp-size} {
    margin: 1px * $sp-size !important;
  }

  .mt#{$sp-size} {
    margin-top: 1px * $sp-size !important;
  }

  .mb#{$sp-size} {
    margin-bottom: 1px * $sp-size !important;
  }

  .ml#{$sp-size} {
    margin-left: 1px * $sp-size !important;
  }

  .mr#{$sp-size} {
    margin-right: 1px * $sp-size !important;
  }

  .p#{$sp-size} {
    padding: 1px * $sp-size !important;
  }

  .pt#{$sp-size} {
    padding-top: 1px * $sp-size !important;
  }

  .pb#{$sp-size} {
    padding-bottom: 1px * $sp-size !important;
  }

  .pl#{$sp-size} {
    padding-left: 1px * $sp-size !important;
  }

  .pr#{$sp-size} {
    padding-right: 1px * $sp-size !important;
  }

  $sp-size: $sp-size+5
}

// 宽度
$width-size: 0;

@while $width-size <=500 {
  .w#{$width-size} {
    display: inline-block;
    width: 1px * $width-size !important;
  }

  $width-size: $width-size+50
}

.w120 {
  display: inline-block;
  width: 120px !important;
}

// 字体
$fz-size: 12;

@while $fz-size <=34 {
  .f#{$fz-size} {
    font-size: 1px * $fz-size !important;
  }

  $fz-size: $fz-size+2;
}

.lh15 {
  line-height: 1.5;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-primary {
  color: #409EFF;

  &-o {
    color: rgb(102, 177, 255);
  }
}

.text-success {
  color: #67C23A;

  &-o {
    color: #E1F3D8;
  }
}

.text-warning {
  color: #E6A23C;

  &-o {
    color: #FAECD8;
  }
}

.text-danger {
  color: #F56C6C;

  &-o {
    color: #FDE2E2;
  }
}

.text-info {
  color: #909399;

  &-o {
    color: #C0C4CC;
  }
}

.text-del {
  text-decoration: line-through;
  color: #F56C6C;
}

.bg-info {
  background-color: #909399;

  &-o {
    background-color: #f7f9fc;
  }
}

.text-bold {
  font-weight: bold;
}

.text-normal {
  font-weight: normal;
}

.text-ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cursor-pointer {
  cursor: pointer;
}

.cursor-move {
  cursor: move;
}

.user-unselect {
  user-select: none;
}

// 弹性盒子
.dis-flex {
  display: flex;

  &.flex-column {
    flex-direction: column;
  }

  &.align-center {
    align-items: center;
    justify-content: center;
  }

  &.ver-center {
    align-items: center;
  }

  .flex-1 {
    flex: 1;
  }
}

.r {
  display: flex;
  align-items: center;
}

.b {
  font-weight: 900;
  // font-size: 16px;
}